package org.mybatis3.test2;

import java.awt.*;

public class GreyInk implements Ink {
    @Override
    public String getColor(int r, int g, int b) {
        int c=(r+g+b)/3;
        Color color =new Color(c,c,c);
        String result= Integer.toHexString(color.getRGB()).substring(2);
        return result;
    }
}
